Optimal. Leaf size=46 \[ \frac{\log (\cosh (c+d x))}{d (a+b)}-\frac{a \log \left (a+b \tanh ^2(c+d x)\right )}{2 b d (a+b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.103652, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3670, 446, 72} \[ \frac{\log (\cosh (c+d x))}{d (a+b)}-\frac{a \log \left (a+b \tanh ^2(c+d x)\right )}{2 b d (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 446
Rule 72
Rubi steps
\begin{align*} \int \frac{\tanh ^3(c+d x)}{a+b \tanh ^2(c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^3}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x}{(1-x) (a+b x)} \, dx,x,\tanh ^2(c+d x)\right )}{2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-\frac{1}{(a+b) (-1+x)}-\frac{a}{(a+b) (a+b x)}\right ) \, dx,x,\tanh ^2(c+d x)\right )}{2 d}\\ &=\frac{\log (\cosh (c+d x))}{(a+b) d}-\frac{a \log \left (a+b \tanh ^2(c+d x)\right )}{2 b (a+b) d}\\ \end{align*}
Mathematica [A] time = 0.0343482, size = 42, normalized size = 0.91 \[ \frac{2 b \log (\cosh (c+d x))-a \log \left (a+b \tanh ^2(c+d x)\right )}{2 a b d+2 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.017, size = 75, normalized size = 1.6 \begin{align*} -{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) }{d \left ( 2\,b+2\,a \right ) }}-{\frac{a\ln \left ( a+b \left ( \tanh \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,b \left ( a+b \right ) d}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) }{d \left ( 2\,b+2\,a \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.5482, size = 111, normalized size = 2.41 \begin{align*} -\frac{a \log \left (2 \,{\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} +{\left (a + b\right )} e^{\left (-4 \, d x - 4 \, c\right )} + a + b\right )}{2 \,{\left (a b + b^{2}\right )} d} + \frac{d x + c}{{\left (a + b\right )} d} + \frac{\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{b d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.43452, size = 319, normalized size = 6.93 \begin{align*} -\frac{2 \, b d x + a \log \left (\frac{2 \,{\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{2} +{\left (a + b\right )} \sinh \left (d x + c\right )^{2} + a - b\right )}}{\cosh \left (d x + c\right )^{2} - 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2}}\right ) - 2 \,{\left (a + b\right )} \log \left (\frac{2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{2 \,{\left (a b + b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 18.753, size = 316, normalized size = 6.87 \begin{align*} \begin{cases} \tilde{\infty } x \tanh{\left (c \right )} & \text{for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac{x - \frac{\log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} - \frac{\tanh ^{2}{\left (c + d x \right )}}{2 d}}{a} & \text{for}\: b = 0 \\\frac{2 d x \tanh ^{2}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac{2 d x}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac{2 \log{\left (\tanh{\left (c + d x \right )} + 1 \right )} \tanh ^{2}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} + \frac{2 \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} + \frac{1}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} & \text{for}\: a = - b \\\frac{x \tanh ^{3}{\left (c \right )}}{a + b \tanh ^{2}{\left (c \right )}} & \text{for}\: d = 0 \\- \frac{a \log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + \tanh{\left (c + d x \right )} \right )}}{2 a b d + 2 b^{2} d} - \frac{a \log{\left (i \sqrt{a} \sqrt{\frac{1}{b}} + \tanh{\left (c + d x \right )} \right )}}{2 a b d + 2 b^{2} d} + \frac{2 b d x}{2 a b d + 2 b^{2} d} - \frac{2 b \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{2 a b d + 2 b^{2} d} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.21236, size = 136, normalized size = 2.96 \begin{align*} -\frac{a \log \left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}{2 \,{\left (a b d + b^{2} d\right )}} - \frac{d x + c}{a d + b d} + \frac{\log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{b d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]